autoResizeTextSp

fun ERROR CLASS: Symbol not found for BoxWithConstraintsScope.autoResizeTextSp(text: String, min: ResizeBound, max: ResizeBound, step: ResizeBound = resizeFixedSp(1f), style: ERROR CLASS: Symbol not found for TextStyle?? = null, maxLines: Int? = null, maxLength: Int? = null, softWrap: Boolean = true, overflow: ERROR CLASS: Symbol not found for TextOverflow = TextOverflow.Clip, contentPadding: ERROR CLASS: Symbol not found for PaddingValues = PaddingValues(0.dp)): ERROR CLASS: Symbol not found for TextUnit

EN Largest font size between minSp and maxSp (step stepSp) so text fits width/height of this box. PT Number = valor em sp (ex. 12, 12.5f). Dp usa o valor numérico do dp como sp (ex. 12.dp → 12 sp).

EN Measurement uses the full resolved style except fontSize (which is swept): font weight, letter spacing, line height, lineHeightStyle, platformTextStyle / font padding, text alignment, etc. — align with your Text composable. Pass softWrap and overflow with the same values as Text when needed. PT Estilo resolvido como no Text; repita softWrap e overflow quando necessário. EN/PT contentPadding: subtract parent (or slot) insets from the box so sizing matches the padded content area.

EN style nullLocalTextStyle.current. maxLines / maxLength null, ≤ 0, or -1 → unlimited / full string. PT style nullLocalTextStyle.current. maxLines / maxLength null, ≤ 0 ou -1 → sem limite / texto completo. EN If maxLength truncates, use the same prefix in Text (e.g. text.take(maxLength)) so the size matches. PT Se maxLength cortar o texto, use o mesmo prefixo no Text para o tamanho bater certo.

BoxWithConstraints {
Text("…", fontSize = autoResizeTextSp("…", 12, 48))
Text("…", fontSize = autoResizeTextSp("…", 12.sp, 48.sp))
}

fun ERROR CLASS: Symbol not found for BoxWithConstraintsScope.autoResizeTextSp(text: String, minSp: Number, maxSp: Number, stepSp: Number = 2, style: ERROR CLASS: Symbol not found for TextStyle?? = null, maxLines: Int? = null, maxLength: Int? = null, softWrap: Boolean = true, overflow: ERROR CLASS: Symbol not found for TextOverflow = TextOverflow.Clip, contentPadding: ERROR CLASS: Symbol not found for PaddingValues = PaddingValues(0.dp)): ERROR CLASS: Symbol not found for TextUnit
fun ERROR CLASS: Symbol not found for BoxWithConstraintsScope.autoResizeTextSp(text: String, minSp: ERROR CLASS: Symbol not found for TextUnit, maxSp: ERROR CLASS: Symbol not found for TextUnit, stepSp: ERROR CLASS: Symbol not found for TextUnit = 2.sp, style: ERROR CLASS: Symbol not found for TextStyle?? = null, maxLines: Int? = null, maxLength: Int? = null, softWrap: Boolean = true, overflow: ERROR CLASS: Symbol not found for TextOverflow = TextOverflow.Clip, contentPadding: ERROR CLASS: Symbol not found for PaddingValues = PaddingValues(0.dp)): ERROR CLASS: Symbol not found for TextUnit
fun ERROR CLASS: Symbol not found for BoxWithConstraintsScope.autoResizeTextSp(text: String, minSp: ERROR CLASS: Symbol not found for Dp, maxSp: ERROR CLASS: Symbol not found for Dp, stepSp: ERROR CLASS: Symbol not found for Dp = 2.dp, style: ERROR CLASS: Symbol not found for TextStyle?? = null, maxLines: Int? = null, maxLength: Int? = null, softWrap: Boolean = true, overflow: ERROR CLASS: Symbol not found for TextOverflow = TextOverflow.Clip, contentPadding: ERROR CLASS: Symbol not found for PaddingValues = PaddingValues(0.dp)): ERROR CLASS: Symbol not found for TextUnit